package com.usooft.metaTalent.core.system.service;

import com.usooft.framework.core.query.Page;
import com.usooft.metaTalent.core.system.entity.SearchTerm;
import com.usooft.metaTalent.core.system.query.SearchTermQuery;
import com.usooft.metaTalent.core.system.wrapper.SearchTermWrapper;

import java.util.List;
import java.util.Optional;

public interface SearchTermService {

    // region 自动生成
    SearchTerm get(Long id);

    Optional<SearchTerm> find(Long id);

    List<SearchTermWrapper> list(SearchTermQuery query);

    Page<SearchTermWrapper> page(SearchTermQuery query);

    int count(SearchTermQuery.Filter filter);
    // endregion

    /**
     * * 修改搜索词条
     *
     * @param searchTerm
     * @param content
     * @param isHot
     * @param isTop
     * @param position
     * @param portType
     * @param sort
     */
    void edit(SearchTerm searchTerm, String content, Boolean isHot, Boolean isTop, SearchTerm.Position position, SearchTerm.PortType portType, Integer sort);

    /**
     * * 创建搜索词条
     *
     * @param content
     * @param isHot
     * @param isTop
     * @param position
     * @param portType
     * @param sort
     */
    void create(String content, Boolean isHot, Boolean isTop, SearchTerm.Position position, SearchTerm.PortType portType, Integer sort);
}